<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head th:include="include :: header"></head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link th:href="@{favicon.ico}" rel="shortcut icon"/>
    <link th:href="@{../../../css/bootstrap.min14ed.css?v=3.3.6}" rel="stylesheet"/>
    <link th:href="@{../../../css/font-awesome.min93e3.css?v=4.4.0}" rel="stylesheet"/>
    <link th:href="@{../../../css/animate.min.css}" rel="stylesheet"/>
    <link th:href="@{../../../css/plugins/simditor/simditor.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{../../../css/style.min862f.css?v=4.1.0}" rel="stylesheet"/>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>
</head>

<body class="gray-bg" >
<div class="wrapper wrapper-content  animated fadeInRight article">
    <div class="row">
        <div class="col-lg-10 col-lg-offset-1">
            <div class="ibox">
                <div class="ibox-content">
                    <div class="pull-right">
                        <button class="btn btn-white btn-xs" type="button">[[${listByid.uname}]]</button>
                        <button class="btn btn-white btn-xs" type="button">[[${listByid.pushdate}]]</button>
                        <input id="mpic" name="mpic" th:value="${listByid.mpic}"  type="hidden">
                    </div>
                    <div class="text-center article-title">
                        <h1 th:text="${listByid.mtitle}"></h1>
                    </div>
                    <p th:utext="${listByid.mcontent}"></p>
                    <div class="layui-carousel" id="test1">
                        <div carousel-item id="pic">
                        </div>
                    </div>
                </div>

                </div>
            </div>
        </div>
    </div>

</div>
<script src="../../../js/jquery.min.js?v=2.1.4"></script>
<script src="../../../js/bootstrap.min.js?v=3.3.6"></script>
<script src="../../../js/content.min.js?v=1.0.0"></script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>

<script th:src="@{/layui/layui.js}"></script>
<script>
    layui.use('carousel', function(){
        var carousel = layui.carousel;
        //建造实例
        carousel.render({
            elem: '#test1'
            ,width: '100%' //设置容器宽度
            ,arrow: 'always' //始终显示箭头
            //,anim: 'updown' //切换动画方式
        });
    });
</script>
<script>
    var mpic = document.getElementById("mpic").value;
    //把str按逗号分隔后,并把分隔后的内容存放在strArr数组中
    var imgdata = mpic.split(";");
    var oBox = document.getElementById('pic');
    var str = '';
    var num = imgdata.length - 1;
    var j;
    for (j=0;j<num;j++) {
        str += '<img id="lun" src="'+ imgdata[j] +'" width="400px" height="300px" />';}
    oBox.innerHTML = str;
</script>
</body>
</html>
